<template>
  <div class="login">
    <!-- 左 -->
    <div class="left">
      <div class="header">
        <img src="@/assets/img/logo.png" class="header-img" alt />
        <span class="t1">黑马面面</span>
        <div class="line"></div>
        <span class="t2">用户登录</span>
      </div>
      <!-- 表单 -->
      <el-form class="form" ref="form" :model="form">
        <!-- 输入框 -->
        <!-- 手机号 -->
        <el-form-item>
          <el-input
            v-model="form.name"
            prefix-icon="el-icon-user-solid"
            placeholder="请输入手机号"
          ></el-input>
        </el-form-item>
        <!-- 密码 注意比其他输入框多一个密码项 -->
        <el-form-item>
          <el-input
            v-model="form.password"
            :show-password="true"
            prefix-icon="el-icon-lock"
            placeholder="请输入密码"
          ></el-input>
        </el-form-item>
        <el-row>
          <el-col :span="16">
            <!-- 验证码 -->
            <el-form-item>
              <el-input
                v-model="form.code"
                prefix-icon="el-icon-key"
                placeholder="请输入验证码"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <!-- 图片 -->
            <img class="keycode" src="@/assets/img/111.jpg" alt />
          </el-col>
        </el-row>
        <!-- 复选 -->
        <el-form-item>
          <el-checkbox v-model="form.checked">
            我已阅读和同意
            <el-link type="primary">用户条款</el-link>和
            <el-link type="primary">隐私条款</el-link>
          </el-checkbox>
        </el-form-item>
        <!-- 双按钮 -->
        <el-button class="btn" type="primary">登录</el-button>
        <br />
        <el-button style="margin-top='10px'" class="btn" type="primary">注册</el-button>
      </el-form>
    </div>
    <div></div>
    <!-- 右 -->
    <div class="righty">
      <img src="@/assets/img/login_right.png" alt />
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        photo: "",
        password: "",
        code: "",
        checked: ""
      }
    };
  }
};
</script>

<style lang="less">
.login {
  height: 100%;
  background: linear-gradient(225deg, #1493fa, #01c6fa);
  // 伸缩布局
  display: flex;
  justify-content: space-around;
  align-items: center;
  .left {
    width: 478px;
    height: 550px;
    background: #f5f5f5;
    padding: 43px;
    .header {
      // 四个标签在同一行显示
      display: flex;
      align-items: center;
      .header-img {
        width: 22px;
        height: 17px;
        margin-right: 20px;
      }
      .line {
        width: 1px;
        height: 28px;
        background: #c7c7c7;
        margin: 0 15px;
      }
      .t1 {
        // width: 94px;
        // height: 22px;
        font-size: 24px;
        font-family: SourceHanSansCN Regular, SourceHanSansCN Regular-Regular;
        font-weight: 400;
        text-align: left;
        color: #0c0c0c;
      }
      .t2 {
        //     width: 87px;
        // height: 21px;
        font-size: 22px;
        font-family: PingFangSC Regular, PingFangSC Regular-Regular;
        font-weight: 400;
        text-align: left;
        color: #0c0c0c;
      }
    }
    .form {
      margin-top: 20px;

      .keycode {
        width: 100%;
        height: 40px;
      }
      .btn {
        width: 100%;
        display: block;
      }
    }
  }
}
</style>